<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">
	<meta content="telephone=no" name="format-detection" />
	<title>{{ student.name }}的钢琴课成绩 - The ONE 智能钢琴教室</title>
	<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/wechat/style.css') }}">
	<script>
function ShowLesson(lessonId){
	var scores = document.getElementsByClassName('songscore');
	for(var i = 0; i < scores.length; i++){
		var s = scores[i];
		if(s.id == lessonId)
			s.style.display = 'block';
		else
			s.style.display = 'none';
	}
}
	</script>
</head>
<body>
	<header>
		<h1>The ONE 智能钢琴教室</h1>
		<h1>学生成绩查询</h1>
		{% if show_all_lessons %}
		<div class="selectSong">
			<label>乐曲</label>
			<select onchange="ShowLesson(this.value);">
				{% for d in data %}
				<option{% if d.is_current %} selected="selected"{% endif %} value="{{ d.lesson_id }}">{{ d.lesson }}</option>
				{% endfor %}
			</select>
		</div>
		{% endif %}
	</header>

	<div style="display:none;">
		<img src="{{ url_for('static', filename='images/wx_logo.jpg') }}" />
	</div>

	{% for d in data %}
	<article class="songscore" id="{{ d.lesson_id }}"{% if not d.get('is_current', False) %} style="display:none"{% endif %}>
		<section class="basic-info">
			<div class="user">
				<img src="{{ url_for('static', filename='images/user_icon.png') }}" /><br>
			</div>
			<div class="progress">
				<span>学习时间</span><span class="study-time">{{ d.time }}</span><br>
				<span>乐理学习</span><span class="complete-state">完成</span>
			</div>
			<span class="username">{{ student.name }}</span>
		</section>
		<section class="knowledge-point">
			<h3 class="section-title">知识点</h3>
			<ul>
				{% for point in d.knowledge %}
				<li>{{ point }}</li>
				{% endfor %}
			</ul>
		</section>
		<section class="score-detail">
			<h3 class="section-title">成 绩</h3>
			<div class="circle-score {{ d.remark_class }}" data-rate="{{ d.max_rate }}">{{ d.remark }}</div>
			<table>
				<tr>
					<td>分句PK</td>
					<td>{{ d.pk_kara.score }}</td>
				</tr>
				<tr>
					<td>全曲PK</td>
					<td>{{ d.pk_score.score }}</td>
				</tr>
				<!-- <tr>
					<td>pk（无灯）</td>
					<td>{{ d.pk_no_led.score }}</td>
				</tr> -->
				<tr>
					<td>小考核·演奏</td>
					<td>{{ d.test_play.score }}</td>
				</tr>
				<tr>
					<td>小考核·乐理</td>
					<td>{{ d.test_music_theory.score }}</td>
				</tr>
				<tr>
					<td>小考核·听力</td>
					<td>{{ d.test_listen.score }}</td>
				</tr>
			</table>
		</section>
	</article>
	{% endfor %}
	<footer>
		<span class="left-line"></span>
		<span class="text">The ONE智能钢琴教室</span>
		<span class="right-line"></span>
	</footer>
</body>
</html>
